<template>
  <div class="box">
    <div class="beijing">
      <div class="banner">
        <van-swipe :autoplay="3000">
          <van-swipe-item v-for="(v, index) in arr" :key="index">
            <img :src="v.img" />
          </van-swipe-item>
        </van-swipe>
      </div>
    </div>
  </div>
</template>
  
  <script>
import axios from "axios";
export default {
  data() {
    return {
      arr: [],
    };
  },
  mounted() {
    axios({
      url: "http://118.178.238.19:3001/api/banner/list",
      methed: "get",
    }).then((res) => {
      this.arr = res.data.data;
      console.log(res.data.data);
    });
  },
};
</script>
  
  <style scoped>
.beijing {
  width: 100%;
  height: 38.1333vw;
  background: url(@/assets/beijing.png);
  background-size: 100%;
}
img {
  display: block;
  width: 93%;
  height: 37.3333vw;
  margin: auto;
  border-radius: 1.3333vw;
}
</style>